﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Configuration;

namespace ICE.Vacations.Entidades
{
    public static class Config
    {
        
        #region Global Resources

        public static string IIFDomain { get; set; }
        public static string IIFUser { get; set; }
        public static string IIFPassword { get; set; }

        public static string queue1 { get; set; }
        public static string queue2 { get; set; }
        public static string queue3 { get; set; }

        public static string docClass { get; set; }
        public static string inputQueue { get; set; }
        public static string uDocument { get; set; }

        public static string logLocation { get; set; }
        public static int logMaxSizeBytes { get; set; }
        public static string logPrefix { get; set; }

        public static string RRHH_DataBase { get; set; }
        public static string RRHH_User { get; set; }
        public static string RRHH_Password { get; set; }
        public static string RRHH_View { get; set; }//nombre de la vista Oracle

        public static string SQL_Server { get; set; }
        public static string SQL_DataBase { get; set; }
        public static string SQL_User { get; set; }
        public static string SQL_Password { get; set; }

        //public static string signExecuteName { get; set; }
        //public static string signExecutePath { get; set; }
        public static string pdfPath { get; set; }

        public static string weekDays { get; set; }//ruta archivo xml con los dias de la semana

        public static string smptServer { get; set; }
        public static string accountFrom { get; set; }
        public static int mailPort { get; set; }
        public static string smtpUser { get; set; }
        public static string smtpPassword { get; set; }
        public static string smtpDomain { get; set; }

        public static string linkPage { get; set; }


        #endregion


        public static void LoadConfig()
        {
            
            

                Config.IIFDomain = ConfigurationManager.AppSettings["IIFDomain"].ToString();
                Config.IIFUser = ConfigurationManager.AppSettings["IIFUser"].ToString();
                Config.IIFPassword = ConfigurationManager.AppSettings["IIFPassword"].ToString();

                Config.linkPage = ConfigurationManager.AppSettings["linkPage"].ToString();

                Config.smptServer = ConfigurationManager.AppSettings["smptServer"].ToString();
                Config.accountFrom = ConfigurationManager.AppSettings["accountFrom"].ToString();
                Config.mailPort = Convert.ToInt32(ConfigurationManager.AppSettings["mailPort"].ToString());
                Config.smtpUser = ConfigurationManager.AppSettings["smtpUser"].ToString();
                Config.smtpPassword = ConfigurationManager.AppSettings["smtpPassword"].ToString();
                Config.smtpDomain = ConfigurationManager.AppSettings["smtpDomain"].ToString();
                
                

                Config.docClass = ConfigurationManager.AppSettings["docClass"].ToString();
                Config.inputQueue = ConfigurationManager.AppSettings["inputQueue"].ToString();
                Config.uDocument = ConfigurationManager.AppSettings["uDocument"].ToString();    

                Config.queue1 = ConfigurationManager.AppSettings["queue1"].ToString();
                Config.queue2 = ConfigurationManager.AppSettings["queue2"].ToString();
                Config.queue3 = ConfigurationManager.AppSettings["queue3"].ToString();

                Config.logLocation = ConfigurationManager.AppSettings["logLocation"].ToString();
                Config.logMaxSizeBytes = Convert.ToInt32(ConfigurationManager.AppSettings["logMaxSizeBytes"].ToString());
                Config.logPrefix = ConfigurationManager.AppSettings["logPrefix"].ToString();

                Config.RRHH_DataBase = ConfigurationManager.AppSettings["RRHH_DataBase"].ToString();
                Config.RRHH_User = ConfigurationManager.AppSettings["RRHH_User"].ToString();
                Config.RRHH_View = ConfigurationManager.AppSettings["RRHH_Table"].ToString();
                Config.RRHH_Password = ConfigurationManager.AppSettings["RRHH_Password"].ToString();

                Config.SQL_Server = ConfigurationManager.AppSettings["SQL_Server"].ToString();
                Config.SQL_DataBase = ConfigurationManager.AppSettings["SQL_DataBase"].ToString();
                Config.SQL_User = ConfigurationManager.AppSettings["SQL_User"].ToString();
                Config.SQL_Password = ConfigurationManager.AppSettings["SQL_Password"].ToString();

                Config.pdfPath = ConfigurationManager.AppSettings["pdfPath"].ToString();
                //Config.signExecuteName = ConfigurationManager.AppSettings["signExecuteName"].ToString();
                //Config.signExecutePath = ConfigurationManager.AppSettings["signExecutePath"].ToString();
                Config.weekDays = ConfigurationManager.AppSettings["weekDays"].ToString();
              
            
            
            
        }



    }
}

